.class public Lcom/nemustech/regina/ReginaWallpaperSelector;
.super Landroid/app/Activity;
.source "ReginaWallpaperSelector.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/regina/ReginaWallpaperSelector$WallpaperImageAdapter;
    }
.end annotation


# static fields
.field private static LOG_FLAG:Z = false

.field private static final TAG:Ljava/lang/String; = "ReginaWallpaperSelector"


# instance fields
.field private mArrayOriginResId:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private mArrayThumbResId:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private mResCare:Lcom/nemustech/regina/ResourceCare;

.field private mSetWallpaperButton:Landroid/widget/Button;

.field private mSharedEditor:Landroid/content/SharedPreferences$Editor;

.field private mSharedPref:Landroid/content/SharedPreferences;

.field private mThemePackage:Ljava/lang/String;

.field private mThemeRes:Landroid/content/res/Resources;

.field private mThemeTitle:Ljava/lang/String;

.field private mWallpaperGallery:Landroid/widget/Gallery;

.field private mWallpaperIconHeight:I

.field private mWallpaperIconWidth:I

.field private mWallpaperImage:Landroid/widget/ImageView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 22
    const/4 v0, 0x0

    sput-boolean v0, Lcom/nemustech/regina/ReginaWallpaperSelector;->LOG_FLAG:Z

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 20
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 38
    return-void
.end method

.method static synthetic access$000(Lcom/nemustech/regina/ReginaWallpaperSelector;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mThemePackage:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$100(Lcom/nemustech/regina/ReginaWallpaperSelector;)Landroid/content/res/Resources;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mThemeRes:Landroid/content/res/Resources;

    return-object v0
.end method

.method static synthetic access$102(Lcom/nemustech/regina/ReginaWallpaperSelector;Landroid/content/res/Resources;)Landroid/content/res/Resources;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 20
    iput-object p1, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mThemeRes:Landroid/content/res/Resources;

    return-object p1
.end method

.method static synthetic access$200(Lcom/nemustech/regina/ReginaWallpaperSelector;)Ljava/util/ArrayList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mArrayOriginResId:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$300(Lcom/nemustech/regina/ReginaWallpaperSelector;)Ljava/util/ArrayList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mArrayThumbResId:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$400(Lcom/nemustech/regina/ReginaWallpaperSelector;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperIconWidth:I

    return v0
.end method

.method static synthetic access$500(Lcom/nemustech/regina/ReginaWallpaperSelector;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperIconHeight:I

    return v0
.end method

.method static synthetic access$600(Lcom/nemustech/regina/ReginaWallpaperSelector;)Landroid/widget/ImageView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperImage:Landroid/widget/ImageView;

    return-object v0
.end method

.method static synthetic access$700(Lcom/nemustech/regina/ReginaWallpaperSelector;)Landroid/content/SharedPreferences$Editor;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSharedEditor:Landroid/content/SharedPreferences$Editor;

    return-object v0
.end method

.method static synthetic access$800(Lcom/nemustech/regina/ReginaWallpaperSelector;)Landroid/widget/Gallery;
    .locals 1
    .parameter "x0"

    .prologue
    .line 20
    iget-object v0, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperGallery:Landroid/widget/Gallery;

    return-object v0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter "savedInstanceState"

    .prologue
    .line 124
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 126
    const v4, 0x7f030013

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ReginaWallpaperSelector;->setContentView(I)V

    .line 128
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mArrayOriginResId:Ljava/util/ArrayList;

    .line 129
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mArrayThumbResId:Ljava/util/ArrayList;

    .line 131
    invoke-virtual {p0}, Lcom/nemustech/regina/ReginaWallpaperSelector;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    .line 132
    .local v0, appContext:Landroid/content/Context;
    const v4, 0x7f070001

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ReginaWallpaperSelector;->getString(I)Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    invoke-virtual {v0, v4, v5}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSharedPref:Landroid/content/SharedPreferences;

    .line 133
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSharedPref:Landroid/content/SharedPreferences;

    invoke-interface {v4}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSharedEditor:Landroid/content/SharedPreferences$Editor;

    .line 135
    invoke-static {p0}, Lcom/nemustech/regina/ResourceCare;->getResourceCare(Landroid/content/Context;)Lcom/nemustech/regina/ResourceCare;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mResCare:Lcom/nemustech/regina/ResourceCare;

    .line 136
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v5, 0x7f0600b6

    invoke-virtual {v4, v5}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v4

    iput v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperIconWidth:I

    .line 137
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mResCare:Lcom/nemustech/regina/ResourceCare;

    const v5, 0x7f0600b7

    invoke-virtual {v4, v5}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v4

    iput v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperIconHeight:I

    .line 139
    invoke-virtual {p0}, Lcom/nemustech/regina/ReginaWallpaperSelector;->getIntent()Landroid/content/Intent;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    .line 140
    .local v1, bundle:Landroid/os/Bundle;
    invoke-virtual {v1}, Landroid/os/Bundle;->keySet()Ljava/util/Set;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, i$:Ljava/util/Iterator;
    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 141
    .local v3, key:Ljava/lang/String;
    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v4

    if-lez v4, :cond_0

    .line 142
    iput-object v3, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mThemeTitle:Ljava/lang/String;

    .line 143
    invoke-virtual {v1, v3}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mThemePackage:Ljava/lang/String;

    .line 148
    .end local v3           #key:Ljava/lang/String;
    :cond_1
    const v4, 0x7f090039

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ReginaWallpaperSelector;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Gallery;

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperGallery:Landroid/widget/Gallery;

    .line 149
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperGallery:Landroid/widget/Gallery;

    const/4 v5, 0x1

    invoke-virtual {v4, v5}, Landroid/widget/Gallery;->setSpacing(I)V

    .line 150
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperGallery:Landroid/widget/Gallery;

    new-instance v5, Lcom/nemustech/regina/ReginaWallpaperSelector$1;

    invoke-direct {v5, p0}, Lcom/nemustech/regina/ReginaWallpaperSelector$1;-><init>(Lcom/nemustech/regina/ReginaWallpaperSelector;)V

    invoke-virtual {v4, v5}, Landroid/widget/Gallery;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V

    .line 162
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperGallery:Landroid/widget/Gallery;

    new-instance v5, Lcom/nemustech/regina/ReginaWallpaperSelector$WallpaperImageAdapter;

    invoke-direct {v5, p0, p0}, Lcom/nemustech/regina/ReginaWallpaperSelector$WallpaperImageAdapter;-><init>(Lcom/nemustech/regina/ReginaWallpaperSelector;Landroid/content/Context;)V

    invoke-virtual {v4, v5}, Landroid/widget/Gallery;->setAdapter(Landroid/widget/SpinnerAdapter;)V

    .line 164
    const v4, 0x7f090038

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ReginaWallpaperSelector;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mWallpaperImage:Landroid/widget/ImageView;

    .line 166
    const v4, 0x7f09003a

    invoke-virtual {p0, v4}, Lcom/nemustech/regina/ReginaWallpaperSelector;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    iput-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSetWallpaperButton:Landroid/widget/Button;

    .line 167
    iget-object v4, p0, Lcom/nemustech/regina/ReginaWallpaperSelector;->mSetWallpaperButton:Landroid/widget/Button;

    new-instance v5, Lcom/nemustech/regina/ReginaWallpaperSelector$2;

    invoke-direct {v5, p0}, Lcom/nemustech/regina/ReginaWallpaperSelector$2;-><init>(Lcom/nemustech/regina/ReginaWallpaperSelector;)V

    invoke-virtual {v4, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 182
    return-void
.end method
